package com.biz.primus.ms.product.degraded;

import com.biz.primus.base.vo.StockRespVo;
import com.biz.primus.commodity.vo.frontend.ProductStockReqProductVo;
import com.biz.primus.commodity.vo.frontend.TypeBProductStockVo;
import com.biz.primus.model.stock.vo.StocksReqVo;
import com.biz.primus.ms.product.feign.StockFeignClient;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author jiangnan
 * @Description:
 */
@Slf4j
@Component
public class DegradedStockFeignClient implements StockFeignClient {
    @Override
    public List<StockRespVo> getDepotsStockInBatch(StocksReqVo reqVo) {
        List<String> productCodes = reqVo.getProductCodes();
        List<StockRespVo> respVos =Lists.newArrayList();
        if (CollectionUtils.isNotEmpty(productCodes)) {
            for (int i = productCodes.size(); i > 0; i--) {
                StockRespVo stockRespVo = new StockRespVo();
                stockRespVo.setQuantity(1);
                stockRespVo.setWarehouseQuantity(1);
                respVos.add(stockRespVo);
            }
        }
        return respVos;
    }

    @Override
    public List<Integer> getTypeAProductStock(List<String> typeAProductCodes) {
        return null;
    }

    @Override
    public List<TypeBProductStockVo> getTypeBProductStocks(List<ProductStockReqProductVo> productStockReqProductVos, String depotCode, String warehouseDepotCode) {
        return null;
    }

    @Override
    public TypeBProductStockVo getTypeBProductStock(ProductStockReqProductVo reqVo, String depotCode, String warehouseDepotCode) {
        return null;
    }

    @Override
    public Integer getTypeAProductStock(String productCode) {
        return null;
    }
}
